/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.p2psimulator.entity.protocol.messages.chord.storm;

import org.p2psimulator.entity.Id;
import org.p2psimulator.entity.Message;
import org.p2psimulator.entity.behavior.BehaviorTypes;
import org.p2psimulator.entity.protocol.messages.MessageTypes;
import org.p2psimulator.entity.reputation.Reputation;

/**
 *
 * @author Amorim
 */
public class WitnessFound extends Message{

    private Id referredId;

    private Id target;

    private Id pred;

    private Reputation opinion;

    public WitnessFound(Id origin, Id destination, int transactionId, BehaviorTypes originBehavior) {
        super(origin, destination, transactionId, originBehavior);
    }

    @Override
    public MessageTypes getMessageType() {
        return MessageTypes.STORM_WITNESSFOUND;
    }

    @Override
    public String getName() {
        return MessageTypes.STORM_WITNESSFOUND.getName();
    }

    public Reputation getOpinion() {
        return opinion;
    }

    public void setOpinion(Reputation opinion) {
        this.opinion = opinion;
    }

    public Id getPred() {
        return pred;
    }
    public void setPred(Id prev) {
        this.pred = prev;
    }
    public Id getReferredId() {
        return referredId;
    }

    public void setReferredId(Id referredId) {
        this.referredId = referredId;
    }

    public Id getTarget() {
        return target;
    }

    public void setTarget(Id target) {
        this.target = target;
    }
}
